<% if !not_signed_in_root_path? %>
  <h1 class="pageTitle">
  <% if sign_in_path? %>
    <%= t('layouts.application.signin') %>
  <% elsif join_path? %>
    <%= t('layouts.application.create_account') %>
  <% elsif forgot_password_path? %>
    <%= t('account.forgot_password') %>
  <% elsif update_account_path? %>
    <%= t('layouts.application.update_account') %>
  <% elsif send_ally_invitation_path? %>
    <%= t('devise.invitations.new.header') %>
  <% elsif ally_accept_invitation_path? %>
    <%= t('devise.invitations.edit.header') %>
  <% elsif reset_password_path? %>
    <%= t('layouts.title.reset_password') %>
  <% elsif new_user_confirmation_path? %>
    <%= t('devise.confirmations.resend_confirmation') %>
  <% elsif yield(:page_new).present? && @page_new %>
    <div>
      <%= yield(:title) %>
    </div>
    <div class="pageTitleRight">
      <%= link_to @page_new, yield(:page_new), class: 'buttonM' %>
    </div>
  <% elsif @page_new_buttons.present? %>
    <div>
      <%= yield(:title) %>
    </div>
    <div class="pageTitleRight">
      <% @page_new_buttons.each_with_index do |button, index| %>
        <%= link_to button[:text], button[:path], class: "buttonM" %>
      <% end %>
    </div>
  <% elsif @page_author.present? %>
    <div>
      <%= yield(:title) %>
    </div>
    <div class="pageTitleRight">
      <%= render partial: '/shared/page_author', locals: { author: @page_author } %>
    </div>
  <% elsif yield(:title).present? %>
    <%= yield(:title) %>
  <% end %>
  </h1>
<% end %>
